export default {
  //时分秒转为时间戳
  countDown(time) {
    var s = 0
    var hour = time.split(':')[0]
    var min = time.split(':')[1]
    var sec = time.split(':')[2]
    hour ? (hour = hour * 60) : (hour = 0)
    min ? (min = min * 1) : (min = 0)
    sec ? (sec = sec * 1) : (sec = 0)
    s = Number(hour) + Number(min) + Number(sec)
    return s
  },
  processCollapseData(v, t) {
    let arr = JSON.parse(JSON.stringify(v))
    let type = t === 1 ? 200277 : t === 2 ? 200278 : t === 3 ? 200279 : null
    arr.forEach((e) => {
      e.collapseData = e.collapseData.filter((f) => {
        return f.studyType === type
      })
    })
    return arr
  },
}
